const { Controller, } = require('egg')
const { getResult } = require('../assets/utils')

class TopicTypeController extends Controller {
  // GET list
  async index() {
    const { ctx } = this
    const topicTypes = await ctx.service.topicType.fetch()
    ctx.body = getResult({
      data: topicTypes
    })
  }
}

module.exports = TopicTypeController
